package com.ukao.steward.ui.login;

import android.os.Bundle;

import com.ukao.steward.R;
import com.ukao.steward.base.BaseActivity;
import com.ukao.steward.consts.SaveParams;
import com.ukao.steward.ui.main.MainActivity;
import com.ukao.steward.util.ActivityUtils;

import butterknife.ButterKnife;
import me.yokeyword.fragmentation.SupportFragment;


public class LoginActivity extends BaseActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (SaveParams.isLogin()){
            ActivityUtils.JumpToActivity(this, MainActivity.class);
            finish();
        }
        setContentView(R.layout.activity_login);
        ButterKnife.bind(this);
        initView();
    }

    @Override
    protected void initView() {
        SupportFragment fragment = findFragment(PassLoginFragment.class);
        if (fragment == null) {
            loadRootFragment(R.id.login_layout, PassLoginFragment.newInstance("", ""));
        }
    }



}

